package com.indexingsystem.system.service;


import java.util.List;

import com.indexingsystem.boss.Vo.NotBugOrderProductListVo;
import com.indexingsystem.boss.Vo.OrderAddProductInitVo;
import com.indexingsystem.boss.Vo.OrderCateReqVo;
import com.indexingsystem.boss.Vo.OrderProductListQueryVo;
import com.indexingsystem.boss.Vo.ResCategorsRelationQueryVo;
import com.indexingsystem.boss.Vo.ResCategoryOrderQueryVo;
import com.indexingsystem.boss.Vo.ResRelationQueryVo;
import com.indexingsystem.boss.Vo.ResourceCategorsSortVo;
import com.indexingsystem.boss.Vo.ResourceCategorsVo;
import com.indexingsystem.boss.Vo.ResourceCategoryAdditionalVo;
import com.indexingsystem.boss.Vo.ResourceRelationInfoVo;
import com.indexingsystem.boss.Vo.TreeOrderQueryVo;
import com.indexingsystem.boss.Vo.TreeParentOrderQueryVo;
import com.indexingsystem.boss.Vo.TreeQueryVo;
import com.indexingsystem.boss.common.PagedResult;
import com.indexingsystem.boss.entity.ResourceCategors;


public interface IResourceCategorsService
{

    /**
     * 根据资源分类id删除资源分类.
     * 
     * @param resTypeId
     * @return
     */
    int deleteByPrimaryKey(String resTypeId)  throws Exception;

    /**
     * 新增资源分类.
     * 
     * @param record
     * @return
     */
    int insertSelective(ResourceCategors record) throws Exception;

    /**
     * 通过资源分类id获取资源分类详情.
     * 
     * @param resCategoryId
     * @return
     */
    ResourceCategorsVo getResCategoryById(String resCategoryId);
    
    
    /**
     * 订单管理产品列表未购列表分页列表.
     * @param pageResult
     * @param treeOrderQueryVo
     * @return
     */
    NotBugOrderProductListVo getOrderProductBugVoList(PagedResult<ResourceCategors> pageResult,TreeOrderQueryVo treeOrderQueryVo);

    /**
     * 通过资源分类id查询资源分类信息.
     * 
     * @param resTypeId
     * @return
     */
    ResourceCategors selectByPrimaryKey(String resCategoryId);
    
    
    /**
     * 获取产品列表中资源分类
     * @param resCategoryIdList
     * @return
     */
    List<ResourceCategorsVo> getResourceCategorsTreeList(List<String> resCategoryIdList);
       
    /**
     * 栏目管理：只显示有资源的资源分类.
     * @param list
     * @return
     */
    List<ResourceCategorsVo> getMenuResourceCategorsTreeList(List<String> resCategoryIdList);
    

    /**
     * 修改资源分类.
     * 
     * @param record
     * @return
     */
    int updateByPrimaryKeySelective(ResourceCategors record) throws Exception;
    
    
    /**
     * 批量修改资源分类上移、下移操作.
     * @param list
     * @return
     * @throws Exception
     */
    int updateBatchResCategors(List<ResourceCategors> list) throws Exception;

    /**
     * 获取父级最大排序值
     * 
     * @param resCategoryId
     * @return
     */
    String getParentCategorySortMax(String resCategoryId);

    /**
     * 分页查询资源分类列表.
     * 
     * @param pageNo
     * @param pageSize
     * @return
     */
    PagedResult<ResourceCategors> selectResourceCategorsList(Integer pageNo, Integer pageSize);

    /**
     * 通过是否为连续出版物过滤资源
     * 
     * @return
     */
    List<ResourceCategorsVo> getPublications(OrderCateReqVo orderCateReqVo);

    /**
     * 获取资源分类上下级列表信息.
     * 
     * @return
     */
    List<ResourceCategorsVo> getResourceCategorsList();
    
    
    /**
     * 产品管理树形中通过联系出版物或非连续出版物过滤分类.
     * @param isPublications
     * @return
     */
    List<ResourceCategorsVo> getResourceCategorsTreeList(Integer isPublications);

    /**
     * 获取资源分类总数量.
     * 
     * @return
     */
    Integer getResourceCategorsListCount();

    /**
     * 获取资源分类中资源关系资源列表总数量.
     * 
     * @return
     */
    Integer getResourceCategorsResRelationListCount(ResRelationQueryVo resRealtionQueryVo);

    /**
     * 获取子资源分类总数.
     * 
     * @param resCategoryId
     * @return
     */
    Integer getSublevelResourceCategorsListSize(TreeQueryVo treeReqVo);

    /**
     * 通过订单id、选择的分类id查询订单未购列表.
     * 
     * @param treeOrderQueryVo
     * @return
     */
    PagedResult<ResourceCategors> selectNotBugSublevelResourceCategorsList(TreeOrderQueryVo treeOrderQueryVo);

    /**
     * 获取子资源分类订单未购买总数.
     * 
     * @param resCategoryId
     * @return
     */
    Integer getNotBugSublevelResourceCategorsListSize(TreeOrderQueryVo treeOrderQueryVo);
    
    
    /**
     * 子级机构获取父级订单已购总数.
     * @param treeOrderQueryVo
     * @return
     */
    Integer getParentNotBugSublevelResourceCategorsListSize(TreeParentOrderQueryVo treeParentOrderQueryVo);
    
    
    /**
     * 子级机构获取父级订单已购列表.
     * @param treeParentOrderQueryVo
     * @return
     */
    PagedResult<ResourceCategors> getParentNotBugSublevelResourceCategorsList(TreeParentOrderQueryVo treeParentOrderQueryVo);
    

    /**
     * 通过资源分类名称和英文名查询资源分类是否重复.
     * 
     * @param resourceCategors
     * @return
     */
    ResourceCategors selectResourceCategorsExits(String resName);
    ResourceCategors selectResourceCategorsByNameModel(ResourceCategors resourceCategors);
    /**
     * 通过资源分类排序查询资源分类排序是否重复.
     * 
     * @param categoryOrder
     * @return
     */
    ResourceCategors selectResourceCategorsOrderNumberExits(String categoryOrder);
    
    
    /**
     * 查询订单产品关系表中资源分类的所有子级分类.
     * @param categoryOrder
     * @return
     */
    List<ResourceCategors> getOrderResourceCategorsListByCategoryOrder(String categoryOrder);
    
    
    /**
     * 查询订单产品关系表中资源分类的子级分类id.
     * @param categoryOrder
     * @return
     */
    List<String> getOrderResourceCategorsIdListByCategoryOrder(String categoryOrder);

    /**
     * 查询子资源分类分页查询
     * 
     * @param resCategoryId
     * @param pageNo
     * @param pageSize
     * @return
     */
    PagedResult<ResourceCategors> selectSublevelResourceCategorsList(TreeQueryVo treeReqVo);

    /**
     * 批量删除资源分类.
     * 
     * @param resCategoryIdList
     * @return
     */
    int deleteResourceCategorsByIdBatch(List<String> resCategoryIdList) throws Exception;

    /**
     * 通过资源分类id查询资源分类包含的资源明细列表.
     * 
     * @param resRealtionQueryVo
     * @return
     */
    PagedResult<ResourceRelationInfoVo> getResourceRelationInfoVoListByResCategoryId(ResRelationQueryVo resRealtionQueryVo);

    /**
     * 非连续出版物类型通过资源分类id获取分类中所有资源的开始年份、结束年份、价格总合附加属性.
     * 
     * @param resCategoryId
     * @return
     */
    ResourceCategoryAdditionalVo getResCategoryAddiionalByResCateId(OrderProductListQueryVo  orderProductListQueryVo);
    
    
	/**
	 * 连续出版物类型通过资源分类id获取分类中所有资源的开始年份、结束年份、价格总合附加属性.
	 * 
	 * @param resCategoryId
	 * @return
	 */
	ResourceCategoryAdditionalVo getMagazinesResCategoryAddiionalByResCateId(OrderProductListQueryVo  orderProductListQueryVo);
	
	
	/**
	 * 通过资源分类id列表获取加入订单初始化开始年份、结束年份连续出版物类型资源信息.
	 * @param resCategoryIdList
	 * @return
	 */
	OrderAddProductInitVo getMagazinesResCategoryProductInitInfo(List<String> resCategoryIdList);
	
	
	/**
	 * 通过资源分类id列表获取加入订单初始化开始年份、预约结束年份非连续出版物类型资源信息.
	 * @param resCategoryIdList
	 * @return
	 */
	OrderAddProductInitVo getResCategoryProductInitInfo(List<String> resCategoryIdList);
	
	
	
	/**
	 * 通过资源分类id所有子分类列表
	 * @param resCategoryId
	 * @return
	 */
    List<ResourceCategors> getResourceCategorsList(String resCategoryId);

    /**
     * 资源分类排序获取自身或目录排序资源分类列表.
     * 
     * @param resCategoryOrderQueryVo
     * @return
     */
    List<ResourceCategors> getResourceCategorsByCategoryOrder(ResCategoryOrderQueryVo resCategoryOrderQueryVo);
    
    
    /**
     * 产品管理：资源分类中获取所有子级分类含自己的所有资源并去重资源列表总数量.
     * @param resCategorsRelationQueryVo
     * @return
     */
    Integer getResourceCategorsResRelationByResCategoryIdListCount(ResCategorsRelationQueryVo resCategorsRelationQueryVo); 
    
    
    /**
     * 产品管理：资源分类中获取所有子级分类含自己的所有资源并去重资源列表.
     * @param resCategorsRelationQueryVo
     * @return
     */
    PagedResult<ResourceRelationInfoVo> getResourceRelationInfoVoListByResCategoryIdlist(ResCategorsRelationQueryVo resCategorsRelationQueryVo);   
    
    
    /**
     * 门户站点获取资源分类中所有子级分类含自己的所有资源并去重资源列表.
     * @param resCategorsRelationQueryVo
     * @return
     */
    List<ResourceRelationInfoVo> getResourceRelaInfoVoListByResCategoryIdlist(ResCategorsRelationQueryVo resCategorsRelationQueryVo);
    
    
    /**
     * 通过资源分类id校验资源分类是否有资源.
     * @param resCategoryId
     * @return
     */
    Integer getResourceCategorsResRelationByResCategoryIdExitsResource(String resCategoryId);
    

    
    /**
     * 通过资源idlist 获取所有子级分类的id集合.
     * @param resCategoryIdList
     * @return
     */
    List<ResourceCategors> getOrderResourceCategorsListByResCategoryIdList(List<String> resCategoryIdList);
    
    
    //排序專用
    List<ResourceCategors> getResourceCategorsListByCondition(ResourceCategorsSortVo resourceCategorsSortVo);

	void updateResourceCategorsListByCondition(ResourceCategorsSortVo resourceCategorsSortVo);
    
    /**
     * 通过订单id获取资源分类详情.
     * 
     * @param resCategoryId
     * @return
     */
    List<ResourceCategors> getResourceCategorsByOrderList(String orderId);
    
    
    String getCategorySortMax(String resCategoryId);
    
}